package com.xnyzc.lhy.mis.service.cms.approval;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.xnyzc.lhy.common.exception.PangException;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * @Description 额度审批
 * @Author zhuyubin
 * @Date 2019-08-27 14:57
 **/
public interface ICmsRaiseApplyService {

    /**
     * 申请提额列表
     * @param sysUserId 后台用户id
     * @param type 权限等级
     * @param tag 租户
     * @param name 用户名
     * @param phone 用户手机号
     * @param officeId 机构id
     * @return
     */
    IPage<Map<String, Object>> selectApplyAmountPage(Long sysUserId, List<String> type, String tag, Long current, String name, String phone, String officeId);

    /**
     * 通过审批
     * @param sysUserId 当前用户
     * @param tag 租户
     * @param raiseId 审批id
     * @return
     */
    @Transactional(rollbackFor = PangException.class)
    String passApplyAmount(Long sysUserId, String tag, String raiseId);

    /**
     * 驳回审批
     * @param sysUserId 当前用户
     * @param raiseId 审批id
     * @return
     */
    String rejectApplyAmount(Long sysUserId, String raiseId, String approvalOpinion);
}
